/* 第２階層メニュー用　POP UP */
	
function popup(obj,id,mx,my) {
	var elm = document.getElementById(id);
	elm.style.display='block';
	elm.style.position='absolute';
	
	myOP = (navigator.userAgent.indexOf("Opera",0) != -1)?1:0; //OP
	myN6 = document.getElementById;  // N6 or IE
	myIE = document.all;             // IE
	myN4 = document.layers;          // N4

	if (myOP){                          // OP?
		elm.left = mx + window.event.clientX + "px";
		elm.top  = my + window.event.clientY + "px";
	}else if (myIE){                    // IE?
		//alert("IE")
		elm=document.all[id].style;
		elm.left = mx + window.event.clientX + document.body.scrollLeft + "px";
		elm.top  = my + window.event.clientY + document.body.scrollTop + "px";	
	}else if (myN6){ 
		//alert("N6")
		elm=document.getElementById(id).style;
		elm.left = mx + window.event.clientX + document.body.scrollLeft + "px";
		elm.top  = my + window.event.clientY + document.body.scrollTop + "px";
	}else if (myN4){
		elm.left = myX + myEvent.x ;
		elm.top  = myY + myEvent.y ;
	}
}

function popdown(id) {
	document.getElementById(id).style.display='none';
}

/*ウィンドウがリサイズされたときにコンテンツ領域の高さを調整*/
function resizeWinodow(){
	$$('.contentsArea').setStyle("display","block");
	
	var browserHeight = document.documentElement.clientHeight;
	var contentsHeight = browserHeight - ($('header').offsetHeight) - ($('logo').offsetHeight) - ($('footer').offsetHeight) + "px"
	var leftrightHeight = browserHeight - ($('logo').offsetHeight) + "px"
	
	if(browserHeight>670){
		$$('.contentsArea').setStyle("height",contentsHeight);	
		$('rightcolumn').setStyle("height",leftrightHeight);
		$('leftcolumn').setStyle("height",leftrightHeight);
	}
}
window.onload = function(){
	resizeWinodow();
}
window.onresize = function(){
	resizeWinodow();
}